<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式布局-案例</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .top{
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        .top>div{
            width: 49%;
        }
        .top img{
            width: 100%;
        }
        .top .right{
            display: flex;
            justify-content: space-between;
        }
        .top .right>div{
            width: 49%;
        }
        @media screen and (max-width:768px) {
            .top>div{
            width: 100%;
        }
        }

        .bottom{
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
        }
        .bottom>div{
            width: 23%;
            padding: 5px;
            box-sizing: border-box;
            border:1px solid gray;

            margin-bottom: 10px;
            box-shadow: 0 0 5px black;
        }
        .bottom img{
            width: 100%;
        }
        @media screen and (min-width:768px) and (max-width:1024px){
            .bottom>div{
            width: 31%;
        }
        }
        @media screen and (min-width:450px) and (max-width:768px){
            .bottom>div{
            width: 48%;
        }
        }
        @media screen and (max-width:450px){
            .bottom>div{
            width: 90%;
        }
        }
        .bottom p{       
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-size: 14px;
    line-height:16px ;
        } 
        .bottom span{
            float: right;
        }
    </style>
</head>
<body>
    <!-- 
        top:flex,wrap,
        >768px 左49% 右49%
        <768px 上100% 下100%

        bottom：flex，wrap
        >1024 23%*4
        768<x<1024 31%*3

        450<x<768 48%*2
        <450 90%*1
     -->
    <div class="top">
        <div class="left">
            <div>
                <img src="images1/swiper1.jpeg" alt="">
            </div>
        </div>
        <div class="right">
            <div>
                <img src="images1/ad1.png" alt="">
            </div>
            <div>
                <img src="images1/ad2.png" alt="">
            </div>
        </div>
    </div>

    <div class="bottom">
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
            <p>
                <time>2016-12-12</time>
                <span>作者：tom</span>
            </p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
        <div>
            <img src="images1/img1.jpg" alt="">
            <p>迷你微型摄影展</p>
        </div>
    </div>

</body>
</html>